<template>
  <div id="app">
    <router-link to="/login">login</router-link>
    <router-link :to="{name:'main',params:{username:'djh'}}">main</router-link>
    <router-link to="/count">count</router-link>
    <router-link to="/axios">axios test</router-link>
    <router-link to="/djh">我是瞎写的</router-link>
    <button @click="goBack">后退</button>
    <button @click="goHome">回到首页</button>
    <router-view></router-view>

  </div>
</template>

<script>


export default {
  name: 'App',
  methods:{
    goBack() {
      this.$router.go(-1);
    },
    goHome() {
      this.$router.push("/");
    }
  }
};
</script>


